<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link type="text/css" rel="stylesheet" href="/js/common/bootstrap/2.2.2/css/bootstrap.min.css"/>
    <link type="text/css" rel="stylesheet" href="/css/base.css"/>
    <script src="/js/common/jquery-min.js"></script>
    <script src="/js/common/bootstrap/2.2.2/js/bootstrap.min.js"></script>
    <script src="/js/purchase_group/purchase_group_model.js"></script>
    <script src="/js/purchase_group/purchase_group_add.js"></script>
    <script src="/js/key/comkey.js"></script>
    <script src="/js/key/uuid.js"></script>
    <link type="text/css" href="/css/purchase/purchase.css" rel="stylesheet"/>
    <title>采购组计划</title>
</head>
<body>
<div>
    <div class="funcBar">
        <div class="pageTitle">采购订单&nbsp;/&nbsp;新建<span id="errorMessage"></span></div>
        <div>
            <input type="button" class="btn" value="保存" onclick="savePurchaseGroup()">
            <div style="float: right; padding-right:20px;" id="toggleTab" onclick="toggleTab(this)">
                <span id="toggleTabText">收起</span><span class="littleTab collapseTab" />
            </div>
        </div>
    </div>
    <hr/>
    <div class="form_sheet">
        <div class="oe_form_sheetbg">
            <table class="table" style="margin-top: 15px;" id="baseInfo">
                <tr>
                    <td class="border_right">采购组编号</td>
                    <td style="width:300px;"><input type="text" class="unEditinput" id="purchase_code" readonly></td>
                    <td class="border_right">采购组名</td>
                    <td><input type="text" id="purchase_name"></td>
                </tr>
                <tr>
                    <td class="border_right">负责人</td>
                    <td>
                        <select class="select" id="purchasePer">
                            <option value="0">系统管理员</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="border_right">制单人</td>
                    <td>
                        <select class="select" id="CreateUser">
                            <option value="0">系统管理员</option>
                        </select>
                    </td>
                    <td class="border_right">制单部门</td>
                    <td>
                        <select class="select">
                            <option value="0">总公司</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="border_right">制单时间</td>
                    <td><input type="text" class="unEditinput" id="CreateDate"  readonly></td>
                </tr>
            </table>
            <ul class="nav nav-tabs" id="myTab" style="padding-left: 30px">
                <li class="active"><a href="#metaria">成员列表</a></li>
                <li><a href="#purchaseStaff">商品列表</a></li>
            </ul>

            <div class="tab-content">
                <div class="tab-pane active" id="metaria">
                    <table class="table table-striped"></table>
                    <a href="#"  onclick="addPersonRows()">增加一行</a>
                </div>
                <div class="tab-pane" id="purchaseStaff">
                    <table class="table table-striped"></table>
                    <a href="#"  onclick="addProductRows()">增加一行</a>
                </div>
            </div>
        </div>
    </div>
</div>
<div id="deleteOrg" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true" data-dataId="" data-detailId="" data-detailName="">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel">请确认</h3>
    </div>
    <div class="modal-body">
        <p>你确定要删除本条数据吗？删除后，数据将不能恢复！</p>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
        <button class="btn btn-primary" id="deleteNow" onclick="deleteDetail();">删除</button>
    </div>
</div>
</body>
<script id="purchase_product" type="text/template">
    <%_.each(datas, function(item) {%>
        <tr>
            <td style="line-height:40px"><%= item.index%></td>
            <td><input type="text" class="input-small" value="<%= item.purchateam_code"></td>
            <td><input type="text" class="input-small" value="<%= item.purchateam_name"></td>
            <td><input type="text" class="input-small" value="<%= item.purchateam_phone"></td>
            <td>
                <a href="#" class="memberEditClass" onclick="editMember($index)" ></a>
                <a href="#" class="memberSaveClass" onclick="saveMember($index)" ></a>
                <a href="#" class="memberDelClass" onclick="deleteMember($index)"></a>
            </td>
        </tr>

</script>
<script>
    $(function () {
        $('#myTab a').click(function (e) {
            e.preventDefault();
            $(this).tab('show');
        })
        renderPersonView();
        renderProductView();
    })
</script>
</html>